<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Beta Shop</title>
</head>
<body>
<p>Iniciar sesi&oacute;n con Facebook:</p>
<fb:login-button perms="email,user_birthday"></fb:login-button>
<script src="//http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>
<script>
$(function() {
  $.ajax({
    url: '//connect.facebook.net/es_ES/all.js',
    dataType: 'script',
    cache: true,
    success: function() {
      FB.init({
        appId: '233584760129187',
        xfbml: true
      });
      FB.Event.subscribe('auth.authResponseChange', function(response) {
        if (response && response.status == 'connected') {
          FB.api('/me', function(response) {
            alert('Nombre: ' + data.name);
          });
        }
      });
    }
  });
});
</script>
</body>
</html>